package system

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type Seckill_activity_deviceRouter struct{}

func (s *Seckill_activity_deviceRouter) InitSeckill_activity_deviceRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	seckill_activity_deviceRouter := Router.Group("seckill_activity_device").Use(middleware.OperationRecord())
	seckill_activity_deviceRouterWithoutRecord := Router.Group("seckill_activity_device")
	seckill_activity_deviceRouterWithoutAuth := PublicRouter.Group("seckill_activity_device")
	{
		seckill_activity_deviceRouter.POST("createSeckill_activity_device", seckill_activity_deviceApi.CreateSeckill_activity_device)
		seckill_activity_deviceRouter.DELETE("deleteSeckill_activity_device", seckill_activity_deviceApi.DeleteSeckill_activity_device)
		seckill_activity_deviceRouter.DELETE("deleteSeckill_activity_deviceByIds", seckill_activity_deviceApi.DeleteSeckill_activity_deviceByIds)
		seckill_activity_deviceRouter.PUT("updateSeckill_activity_device", seckill_activity_deviceApi.UpdateSeckill_activity_device)
	}
	{
		seckill_activity_deviceRouterWithoutRecord.GET("findSeckill_activity_device", seckill_activity_deviceApi.FindSeckill_activity_device)
		seckill_activity_deviceRouterWithoutRecord.GET("getSeckill_activity_deviceList", seckill_activity_deviceApi.GetSeckill_activity_deviceList)
	}
	{
		seckill_activity_deviceRouterWithoutAuth.GET("getSeckill_activity_devicePublic", seckill_activity_deviceApi.GetSeckill_activity_devicePublic)
		seckill_activity_deviceRouterWithoutAuth.POST("updateStockSaga", seckill_activity_deviceApi.UpdateStockSaga)
		seckill_activity_deviceRouterWithoutAuth.POST("decreaseStock", seckill_activity_deviceApi.DecreaseStock)
		seckill_activity_deviceRouterWithoutAuth.POST("decreaseStockCompensate", seckill_activity_deviceApi.DecreaseStockCompensate)
		seckill_activity_deviceRouterWithoutAuth.POST("updateStock", seckill_activity_deviceApi.UpdateStock)
		seckill_activity_deviceRouterWithoutAuth.POST("updateStockCompensate", seckill_activity_deviceApi.UpdateStockCompensate)
		seckill_activity_deviceRouterWithoutAuth.POST("preheatStock", seckill_activity_deviceApi.PreheatStock)
		seckill_activity_deviceRouterWithoutAuth.POST("clearRedis", seckill_activity_deviceApi.ClearRedis)
		seckill_activity_deviceRouterWithoutAuth.POST("cacheAllToRedis", seckill_activity_deviceApi.CacheAllToRedis)
		seckill_activity_deviceRouterWithoutAuth.GET("getAllFromRedis", seckill_activity_deviceApi.GetAllFromRedis)
		seckill_activity_deviceRouterWithoutAuth.POST("seckillCreateOrder", seckill_activity_deviceApi.SeckillCreateOrder)
	}
}
